//
// Created by Administrator on 2024/4/9.
//
#include<bits/stdc++.h>

using namespace std;

int a[50][50];
int n, m;

int main() {
    cin >> n;
    m = 2 * n + 1;
    for (int i = 0; i < m; i++) {
        for (int j = 0; j < m; j++) {
            a[i][j] = max(abs(n - i), abs(n - j));
        }
    }
    for (int i = 0; i < m; i++) {
        for (int j = 0; j < m; j++) {
            cout << setw(2) << a[i][j];
        }
        cout << endl;
    }
    return 0;
}